


# 从onos获取路径后的格式化处理
def str2routepath(pathstrs, srcyh, dstyh):
    print('start str2routepath......')
    routepathji = ''
    ovsji = pathstrs["paths"][0]["links"][0]["src"]["device"]
    for pathstr in pathstrs["paths"][0]["links"]:
        routepathid = pathstr["dst"]["device"]
        routepathji += num2ji(routepathid) + '->'
    ovsji = num2ji(ovsji)
    routepathji = ovsji + '->' + routepathji
    routepathji = routepathji.rstrip('->')
    print('routepathji: ',routepathji)
    print('finished str2routepath')
    return routepathji